<template>
    <el-popover placement="right" width="100" trigger="hover">
        <div>
            <upload-button :action="action" :data="{ type: 1 }" @complete="onComplete" text="库存上传" type="default" class="mb8"></upload-button>
            <upload-button :action="action" :data="{ type: 2 }" @complete="onComplete" text="采购上传" type="default"></upload-button>
        </div>
        <el-button slot="reference" type="success">上传文件</el-button>
    </el-popover>
</template>

<script>
export default {
    name: 'UploadInventory',
    data() {
        return {
            action: process.env.VUE_APP_BASE_API + '/product/ProductInventory/uploadInventory',
        }
    },
    methods: {
        onComplete() {
            this.$emit('update')
        },
    },
}
</script>

<style></style>
